package com.demo.service;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;

@Service
@Transactional
public class TaskExcuteService  {

    @Scheduled(cron = "30 * * * * ?")
    public void excute() {
        System.out.println("注解执行开始==============注解执行开始");
        System.out.println(new Date());
        System.out.println("注解执行结束==============注解执行结束");
    }

}
